<template>
  <div class="chartContainer">
    <div class="title">
      <span class="titleText">产品入库种类统计图</span>
      <span class="sybTitleText"></span>
    </div>
    <div class="chartInContainer">
      <v-chart :options="option"></v-chart>
    </div>
  </div>
</template>

<script>
import basicMixins from '@/utils/commonChartMixins'

export default {
  name: 'productInCategoryWeightChart',
  mixins: [basicMixins],
  methods: {
    requestData() {
      const option = {}
      this.mRequest('productApi/getProductWeightByCategory', option, (res) => {
        this.option = this.groupOption(this.R.pathOr(this.option, ['data', 'eChartJson'], res))
      })
    },
    groupOption(obj) {
      return this.normalPieOption(obj)
    }
  },
  mounted() {
    this.init()
  }
}
</script>

<style scoped>

</style>
